package com.project.springboot.clone;

import cn.hutool.core.util.ObjectUtil;

import java.io.Serializable;

/**
 * description: 我的克隆实体类
 * @author 朱正磊
 * @date 2025-07-30 11:31:38
 */
public class MyClonePojo implements Serializable {

    private static final long serialVersionUID = 9181312325260269681L;

    private Integer id;

    private String name;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "MyClonePojo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

    public MyClonePojo deepClone() {
        return ObjectUtil.cloneByStream(this);
    }

}
